#include <Windows.h>

#include "RawInput.h"

void RawInput::RegisterMouse()
{
	//RegisterRawInputDevices(
}

/*
UINT list_size = 0;
	GetRawInputDeviceList(NULL, &list_size, sizeof(RAWINPUTDEVICELIST));
	RAWINPUTDEVICELIST* device_list = (RAWINPUTDEVICELIST*)malloc(list_size * sizeof(RAWINPUTDEVICELIST));
	GetRawInputDeviceList(device_list, &list_size, sizeof(RAWINPUTDEVICELIST));

	int i = 0;

	while(i++ < list_size)
		DescribeDevice(device_list[i].hDevice);

	free(device_list);

*/

void DescribeDevice(HANDLE device_handle)
{
	RID_DEVICE_INFO device_info;
	UINT size = sizeof(RID_DEVICE_INFO);
	GetRawInputDeviceInfo(device_handle, RIDI_DEVICEINFO, &device_info, &size);

	/*if(device_info.dwType == RIM_TYPEKEYBOARD)
		sprintf(debug_string, "Keyboard with %ld indicators\n", device_info.keyboard.dwNumberOfIndicators);
	else if(device_info.dwType == RIM_TYPEMOUSE)
		sprintf(debug_string, "Mouse with %ld buttons, %ld sample rate and %s wheel\n", device_info.mouse.dwNumberOfButtons, device_info.mouse.dwSampleRate, device_info.mouse.fHasHorizontalWheel ? "a" : "NO");
	else
		sprintf(debug_string, "Other device: Vendor: %lu, Product: %lu\n", device_info.hid.dwVendorId, device_info.hid.dwProductId);
		
	OutputDebugStringA(debug_string);*/
}
